Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AWS object store for us-east-2 #18100

Merged
merged 4 commits into from
May 7, 2024
Merged

Conversation

jmchilton
Copy link
Member

Boto uses an older style signature for signing requests to AWS (v2). This is no allowed for regions created after 2014 - such as us-east-2. The newer style signatures can be turned on for newer regions but it requires also specifying a host. So the work around I worked through is allowing a region to be specified and if a region is specified just use the newer signatures and specify a host automatically. I put this all in the code as comments and I used it to run through a test case for AWS storage.

When we launch with #15875 I am guessing we probably want to allow a boto3 object store to be used. It has much easier multiprocess uploading and I think doesn't require this guess and check for the host and region and has been updated since 2018 unlike this older stuff.

How to test the changes?

(Select all options that apply)

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@jmchilton jmchilton marked this pull request as ready for review May 6, 2024 19:41
@github-actions github-actions bot added this to the 24.1 milestone May 6, 2024
@@ -581,7 +601,7 @@ def _create(self, obj, **kwargs):

def _empty(self, obj, **kwargs):
if self._exists(obj, **kwargs):
return bool(self._size(obj, **kwargs) > 0)
return bool(self._size(obj, **kwargs) == 0)
Copy link
Member

@mvdbeek mvdbeek May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the other object stores have the same issue. And we could drop the unnecessary bool cast.

@jmchilton
Copy link
Member Author

I think all the other object stores have the same issue

I went to write my first object store and there is like 400 lines of code in each and about 20 are different between them all - everyone just copy and pasted and changed a little 😿. I will remove... a great majority of the duplication in a follow up PR that will include my boto3 S3 PR.

@jmchilton jmchilton merged commit 0910741 into galaxyproject:dev May 7, 2024
55 checks passed
@nsoranzo nsoranzo deleted the aws_fixes branch May 7, 2024 13:40
@mvdbeek
Copy link
Member

mvdbeek commented May 7, 2024

Thank you @jmchilton, really appreciate that, and happy to help out with this if you want to break that task apart.

@jdavcs jdavcs changed the title Fix AWS Object Store for us-east-2 Fix AWS object store for us-east-2 May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants